﻿import QtQuick 2.15
import QtQuick.Controls 2.15
/*
  修改密码界面
*/

Item {
    id:backGround
    width: screenWidth
    height: 1600

    Rectangle{
        anchors.fill: backGround
        color: "#00BFFF"
        border.width: 5
        border.color: "#F0F8FF"
    }

    onVisibleChanged: {
        if(visible === true)
        {
            Cpp_Connect.pageNumber = 18
        }
    }

    Text{
        anchors.top: backGround.top
        anchors.topMargin: 60
        anchors.left: backGround.left
        anchors.leftMargin: 50
        font.pixelSize: 30
        font.bold: true
        text: qsTr("当前用户")
    }

    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 20
        anchors.left: backGround.left
        anchors.leftMargin: 200
        border.width: 1
        border.color: "black"
        width: 200
        height: 100
        radius: 20


        Text {          // 当前用户名称
            id:currentUser
            anchors.centerIn: parent
            font.pixelSize: 30
            font.bold: true
            text: qsTr("test")
        }
    }

    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 300
        anchors.horizontalCenter: backGround.horizontalCenter
        color: "#006cee"
        border.width: 1
        border.color: "#F0F8FF"
        width: 300
        height: 100
        radius: 10

        Text{
            anchors.centerIn: parent
            font.pixelSize: 30
            font.bold: true
            text: qsTr("用户登录")
        }

        MouseArea{
            anchors.fill: parent

            onPressed: {
                parent.color = "#ff3606"
            }

            onReleased: {
                parent.color = "#006cee"
                loginUser_Window.open()
            }
        }
    }

    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 500
        anchors.horizontalCenter: backGround.horizontalCenter
        color: "#006cee"
        border.width: 1
        border.color: "#F0F8FF"
        width: 300
        height: 100
        radius: 10

        Text{
            anchors.centerIn: parent
            font.pixelSize: 30
            font.bold: true
            text: qsTr("用户退出")
        }

        MouseArea{
            anchors.fill: parent

            onPressed: {
                parent.color = "#ff3606"
            }

            onReleased: {
                parent.color = "#006cee"
            }
        }
    }

    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 700
        anchors.horizontalCenter: backGround.horizontalCenter
        color: "#006cee"
        border.width: 1
        border.color: "#F0F8FF"
        width: 300
        height: 100
        radius: 10

        Text{
            anchors.centerIn: parent
            font.pixelSize: 30
            font.bold: true
            text: qsTr("更改密码")
        }

        MouseArea{
            anchors.fill: parent

            onPressed: {
                parent.color = "#ff3606"
            }

            onReleased: {
                parent.color = "#006cee"
            }
        }
    }

    Text{
        anchors.horizontalCenter: backGround.horizontalCenter
        anchors.top: backGround.top
        anchors.topMargin: 900
        font.pixelSize: 40
        font.bold: true
        color: "red"
        text: qsTr("请牢记密码，否则需要返场维修！！！")
    }


    Popup{
        id: loginUser_Window
        width: 650
        height: 870
        anchors.centerIn: backGround
        background: Rectangle{
            color: "gold"
            border.width: 5
            border.color: "#f0f8ff"
        }

        Item{
            id:popupBackGround
            anchors.fill: parent
        }


    }






    Rectangle{
        anchors.left: backGround.left
        anchors.leftMargin: 30
        anchors.bottom: backGround.bottom
        anchors.bottomMargin: 30
        radius: 10
        color: "#006cee"
        border.width: 1
        border.color: "#f0f8ff"
        width: 200
        height: 100

        Text{
            anchors.centerIn: parent
            font.pixelSize: 30
            font.bold: true
            text: qsTr("返  回")
        }

        MouseArea{
            anchors.fill: parent

            onPressed: {
                parent.color = "#ff3606"
            }

            onReleased: {
                parent.color = "#006cee"
                changePasswdWindow.visible = false
                advanceSettingWindow.visible = true
            }
        }
    }
}
